package com.hck.domain.consultation.repository;

import com.hck.domain.consultation.model.entity.HealthConsultationEntity;

import java.util.Date;
import java.util.List;

public interface IHealthConsultationRepository {
    void save(HealthConsultationEntity consultationEntity);
    HealthConsultationEntity findById(Long id);
    List<HealthConsultationEntity> findByUserId(Long userId);
    List<HealthConsultationEntity> findByDoctorId(Long doctorId);
    void updateStatus(Long id, String status, Date replyTime, Date closeTime);
    
    /**
     * 统计用户咨询总数
     */
    Long countByUserId(Long userId);
    
    /**
     * 分页查询用户咨询列表
     */
    List<HealthConsultationEntity> findByUserIdPage(Long userId, Integer offset, Integer limit);
    
    /**
     * 统计医生咨询总数
     */
    Long countByDoctorId(Long doctorId);
    
    /**
     * 分页查询医生咨询列表
     */
    List<HealthConsultationEntity> findByDoctorIdPage(Long doctorId, Integer offset, Integer limit);
}
